/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.restaurant.domain;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Transient;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author root
 */
@Entity
@Table(name = "foodtype")
@XmlRootElement(name = "foodtype")
@NamedQueries({
    @NamedQuery(name = "Foodtype.findAll", query = "SELECT f FROM Foodtype f"),
    @NamedQuery(name = "Foodtype.findByFoodTypeID", query = "SELECT f FROM Foodtype f WHERE f.foodTypeID = :foodTypeID"),
    @NamedQuery(name = "Foodtype.findByFoodname", query = "SELECT f FROM Foodtype f WHERE f.foodname = :foodname"),
    @NamedQuery(name = "Foodtype.findByDescription", query = "SELECT f FROM Foodtype f WHERE f.description = :description"),
    @NamedQuery(name = "Foodtype.findByIsdeleted", query = "SELECT f FROM Foodtype f WHERE f.isdeleted = :isdeleted")})
public class Foodtype implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "FoodTypeID")
    private Long foodTypeID;
    @Column(name = "foodname")
    private String foodname;
    @Column(name = "description")
    private String description;
    @Column(name = "isdeleted")
    private Boolean isdeleted;
        
    @Transient
    private String alreadyExists;   
    

    public String getAlreadyExists() {
		return alreadyExists;
	}

	public void setAlreadyExists(String alreadyExists) {
		this.alreadyExists = alreadyExists;
	}

	public Foodtype() {
    }

    public Foodtype(Long foodTypeID) {
        this.foodTypeID = foodTypeID;
    }

    public Long getFoodTypeID() {
        return foodTypeID;
    }

    public void setFoodTypeID(Long foodTypeID) {
        this.foodTypeID = foodTypeID;
    }

    public String getFoodname() {
        return foodname;
    }

    public void setFoodname(String foodname) {
        this.foodname = foodname;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public Boolean getIsdeleted() {
        return isdeleted;
    }

    public void setIsdeleted(Boolean isdeleted) {
        this.isdeleted = isdeleted;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (foodTypeID != null ? foodTypeID.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Foodtype)) {
            return false;
        }
        Foodtype other = (Foodtype) object;
        if ((this.foodTypeID == null && other.foodTypeID != null) || (this.foodTypeID != null && !this.foodTypeID.equals(other.foodTypeID))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.restaurant.domain.Foodtype[foodTypeID=" + foodTypeID + "]";
    }

}
